# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libsecret
pkgver=0.18.5+14+g9980655
pkgrel=1
pkgdesc="Library for storing and retrieving passwords and other secrets"
arch=(i686 x86_64)
license=(LGPL)
url="https://wiki.gnome.org/Projects/Libsecret"
depends=(glib2 libgcrypt)
checkdepends=(python-dbus dbus-glib python-gobject gjs)
makedepends=(intltool docbook-xsl gobject-introspection vala git gtk-doc)
optdepends=('gnome-keyring: key storage service (or use any other service implementing org.freedesktop.secrets)')
_commit=998065599c66055dcffa1ef1ddebb947ccd68248  # master
source=("git+https://git.gnome.org/browse/libsecret#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --disable-static --enable-gtk-doc
  make
}

check() {
  cd $pkgname
  dbus-run-session make -k check 
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
